//
//  AFNTool.h
//  AFN
//
//  Created by 李占鹏 on 16/6/28.
//  Copyright © 2016年 Batac_Lee. All rights reserved.
//

#import <Foundation/Foundation.h>
//请求方式使用枚举
typedef NS_ENUM(NSInteger, AFNRequestType) {
    AFNRequestGET,
    AFNRequestPOST,
};

@interface AFNTool : NSObject<NSCopying,NSMutableCopying>
//获得单例对象
+(instancetype)shareInstance;
//发送网络请求
-(void)request:(AFNRequestType)type
     urlString:(NSString *)urlString
    parameters:(NSDictionary *)parameters
      finished:(void (^)(NSURLSessionDataTask * result, NSError * error))finished;


@end
